package com.micai.springboot.base.session;

import javax.servlet.http.HttpServletRequest;
import java.io.Serializable;

public interface SessionProvider {

    // 往session设置值
    // name Constants buyer_session
    // value 用户对象
    public void setAttribute(HttpServletRequest request, String name, Serializable value);

    // 从Session中取值
    public Serializable getAttribute(HttpServletRequest request, String name);

    // 退出登录
    public void logout(HttpServletRequest request);

    // 获取SessionID
    public String getSessionId(HttpServletRequest request);
}
